<template>
  <div class="home">
      <h1>pina的getters:{{cartNums}}</h1>
  </div>
</template>

<script setup>
import {computed,getCurrentInstance} from 'vue'

// 使用全局挂载的方法 app.globalProperties挂载的
let {proxy}=getCurrentInstance(); //获取全局挂载的属性方法和插件等
console.log(proxy,"-------------")
console.log(proxy.$run())

    import {cartStore} from '@/pstore/cart'
    let cstore=cartStore();
    let cartNums=computed(()=>cstore.cartNums);
</script>
